Skip to content

use normal entrypoints into base's display pipeline#736

Open
rokke-git wants to merge 3 commits into
JuliaSparse:mainfrom
rokke-git:detangle-output
Open

use normal entrypoints into base's display pipeline#736
rokke-git wants to merge 3 commits into
JuliaSparse:mainfrom
rokke-git:detangle-output

Conversation

@rokke-git

@rokke-git rokke-git commented Jul 16, 2026

Copy link
Copy Markdown

Base and SparseArrays had some funky action-at-a-distance stuff going on, this fully disentangles the printing functions. this is what I really came over here for, the type thing was just me hoping to simplify things a bit. didn't end up effecting much, but does add the circular_reference line.

it also makes SparseArrays a little smarter about when to swap to braille output, and actually uses the whole screen instead of just the left half. it's also theoretically doing less work now, but it's just a printing function so whatever. the width of displayed zeros also doesn't depend on the type anymore, and is always centered.

since this removes the error that used to come up during printing, I added in a new warning to replace it.

fixes: #21, #22, #233, #618

@rokke-git

rokke-git commented Jul 16, 2026

Copy link
Copy Markdown
Author

lol, guess the doctests are a good way of displaying what's changed...

@rokke-git
rokke-git force-pushed the detangle-output branch 4 times, most recently from 0516cde to 5e7647d Compare July 16, 2026 05:53
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.48%. Comparing base (751387e) to head (7969cbe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #736      +/-   ##
==========================================
+ Coverage   84.40%   84.48%   +0.07%     
==========================================
  Files          13       13              
  Lines        9374     9422      +48     
==========================================
+ Hits         7912     7960      +48     
  Misses       1462     1462              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rokke-git
rokke-git force-pushed the detangle-output branch 4 times, most recently from 187b579 to 2a637f6 Compare July 16, 2026 07:35
@rokke-git

Copy link
Copy Markdown
Author

since I'm already here, started looking through existing display issues.
now fixes: #21, #22, #233, #618

@rokke-git
rokke-git force-pushed the detangle-output branch 3 times, most recently from 4aba457 to 5de63a2 Compare July 16, 2026 17:32
@rokke-git

rokke-git commented Jul 16, 2026

Copy link
Copy Markdown
Author

this last push just changed the Matrix(x) conversion call as specified in #618 from dest[isrc[row, col]] = val to dest[isrc[row, col]] += val, which technically adds a get to a potentially hot loop (ie, not display, actual computation).

if this should instead be actually benchmarked I can remove this change; or if we don't care it can remain fixed like this. the dest matrix was already initialized with basically zero(eltype(x)), so Matrix(x) would have already been failing for non-numeric types, no change there

Base and SparseArrays had some funky action-at-a-distance
stuff going on, this fully disentangles them. this also makes
SparseArrays a little smarter about when to swap to braille,
and actually uses the whole screen instead of just the left
half.

it's also theoretically doing less work now, but it's just a
printing function so whatever. width of displayed zeros also
doesn't depend on the type anymore, so that error goes away;
added in a warning to replace it.
@rokke-git
rokke-git force-pushed the detangle-output branch 3 times, most recently from b7ff188 to 1ba3b0f Compare July 16, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spy printing of sparse matrices is inaccurate

1 participant